﻿using System;

namespace T1_
{
    class Program
    {
        static void Main(string[] args)
        {

            Game game = new Game();
            game.name = "英雄联盟";
            game.category="MOBA";
            game.price =999.99;
            game.stock = 50;
            game.dateTime =DateTime.Now;

            Game game2 = new Game();
            game2.name = "PUBG";
            game2.category = "射击类";
            game2.price = 98.00;
            game2.stock = 20;
            game2.dateTime = DateTime.Now;

            Game game3 = new Game();
            game3.name = "Battlefield V";
            game3.category = "射击策略类";
            game3.price = 138;
            game3.stock = 30;
            game3.dateTime = DateTime.Now;


            Game[] games = new Game[3];
            games[0] = game;
            games[1] = game2;
            games[2] = game3;
            Console.WriteLine("游戏\t\t类型\t\t数量\t\t价格\t\t上架时间");
            for (int i = 0; i < games.Length; i++)
            {
                Console.WriteLine("{0}\t\t{1}\t\t{2}\t\t{3}\t\t{4}",games[i].name,games[i].category,games[i].stock,games[i].price,games[i].dateTime);
            }

            Console.WriteLine("-----------入库--------------");
            games[0].Sh(10);
            games[1].Sh(10);
            games[2].Sh(10);

            Console.WriteLine("---------------销售-----------");
            games[0].Xy(2);
            games[1].Xy(5);
            games[2].Xy(6);

        }
    }
}
